package edu.jd.movieplatform.info.cinema.impl;

import edu.jd.movieplatform.info.cinema.Cinema;
import edu.jd.movieplatform.info.cinema.CinemaDto;
import edu.jd.movieplatform.info.cinema.CinemaService;
import edu.jd.movieplatform.info.cinema.dao.CinemaDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class CinemaServiceImpl implements CinemaService {

    @Resource
    private CinemaDao cinemaDao;

    @Override
    public List<Cinema> getCinemaList(CinemaDto dto) {
        return cinemaDao.findCinemaListByCondition(dto);
    }

    @Override
    public List<Cinema> getCinemaNameList() {
        return cinemaDao.findCinemaNameList();
    }
}
